package sso.filter;


import bean.UserDTO;
import filter.SsoFilter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Component
public class Web1LoginFilter extends SsoFilter {
    @Value("${ssoAddr}")
    private String ssoAddr;


    @Override
    protected String ssoAddr() {
        return ssoAddr;
    }

    @Override
    protected void login(HttpServletRequest request, HttpServletResponse response, UserDTO userDTO) {
        request.setAttribute("user", userDTO);
    }
}
